package cn.ad.model;

import cn.ad.enumration.AgencyStatus;
import org.apache.ibatis.type.Alias;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by Administrator on 2016/9/7.
 */
@Alias("agencyModel")
public class AgencyModel {

    /**
     * 代理商ID
     */
    private Integer id;

    /**
     * 代理商名称
     */
    private String name;

    /**
     * 代理商状态标识
     */
    private Integer status;

    /**
     * 代理商状态名称
     */
    private String statusValue;

    /**
     * 代理商服务费
     */
    private BigDecimal commission;

    /**
     * 广告主个数
     */
    private Integer advertiserNum;

    /**
     * 创建时间
     */
    private Date createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusValue() {
        if (status==null){
            status=1;
        }
        return AgencyStatus.forValue(status);
    }

    public void setStatusValue(String statusValue) {
        this.statusValue = statusValue;
    }

    public BigDecimal getCommission() {
        return commission;
    }

    public void setCommission(BigDecimal commission) {
        this.commission = commission;
    }

    public Integer getAdvertiserNum() {
        return advertiserNum;
    }

    public void setAdvertiserNum(Integer advertiserNum) {
        this.advertiserNum = advertiserNum;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
